/****************************************************
          File Name:10-1_imply.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Mon 22 Dec 2014 08:47:44 PM CST
*****************************************************/

#include"10-1.h"
//#include<cstring> // strcpy

/*
Test::Test(char name[], char acc[], double number)
{
    strcpy(m_name, name);
    strcpy(m_acc, acc);
    m_number = number;
}
*/

Test::Test(const std::string & name, const std::string & acc, double number)
{
    m_name = name;
    m_acc = acc;
    m_number = number;
}

Test::~Test()
{
    std::cout <<"---end---" << std::endl;
}

void Test::show(void) const 
{
    std::cout << m_name << std::endl;
    std::cout << m_acc << std::endl;
    std::cout << m_number << std::endl;
}

void Test::store(double number)
{
    m_number += number;
}

void Test::take(double number)
{
    m_number -= number;
}
